/**
 * 
 */
package abstracfactory;

import factorymethod.Factory;

/**
 * PatternBox: "Client" implementation.
 * <ul>
 *   <li>uses only interfaces declared by AbstractFactory and AbstractProduct classes.</li>
 * </ul>
 * 
 * @author <a href="mailto:dirk.ehms@patternbox.com">Dirk Ehms</a>
 * @author lx
 */
public class Client {

	/** holds the factory instance */
	private final WindowFactory fFactory;

	/** 
	 * This construtor creates a Client instance.
	 */
	public Client(WindowFactory factory) {
		super();
		fFactory = factory;
	}

	/** 
	 * This is just an example how to use the Abstract Factory pattern. This
	 * operation must be customized based on your application needs.
	 */
	public void useConcreteProduct() {
		// TODO: Customize this method based on your application needs.
		final Button product = fFactory.createButton();
		product.doSomething();
	}
public static void main(String[] args) {
	WindowFactory factory=new MosFactory();
	factory.createButton();
	factory.createText();
	
	 
}
}
